#ifndef __DUNE_EQUATION_CONSTADVECTION_HH__
#define __DUNE_EQUATION_CONSTADVECTION_HH__
#include "equation-base.hh"
#include <dune/common/parametertreeparser.hh>
namespace Dune {
  namespace Equation {
    template<int dim>
    class ConstantAdvection_ : public EquationBase{};
    template<int dim> 
    using ConstantAdvection = ConstantAdvection_<dim>;

    template<> 
    class ConstantAdvection_<1> : public EquationBase{
    public:
      static constexpr int dim = 1;
      static constexpr int nvar = 2;
      ConstantAdvection_<1>(Dune::ParameterTree& ptree);
      virtual ~ConstantAdvection_<1>();  
      void get_equation_flux(int whichdim, double* fequ, double* var);
      void set_equ_paras(Dune::ParameterTree& ptree);
      double local_max_eigenvalue(double* var);
    private:
      void get_1d_fx(double* fequ, double* var);
    };

    template<>
    class ConstantAdvection_<2> : public EquationBase{
    public:
      static constexpr int dim = 2;
      static constexpr int nvar = 2;
      ConstantAdvection_<2>(Dune::ParameterTree& ptree);
      virtual ~ConstantAdvection_<2>();  
      void get_equation_flux(int whichdim, double* fequ, double* var);
      void set_equ_paras(Dune::ParameterTree& ptree);
      double local_max_eigenvalue(double* var);
    private:
      void get_2d_fx(double* fequ, double* var);
      void get_2d_fy(double* fequ, double* var);
    };

    template<>
    class ConstantAdvection_<3> : public EquationBase{
    public:
      static constexpr int dim = 3;
      static constexpr int nvar = 2;
      ConstantAdvection_<3>(Dune::ParameterTree& ptree);
      virtual ~ConstantAdvection_<3>();  
      void get_equation_flux(int whichdim, double* fequ, double* var);
      void set_equ_paras(Dune::ParameterTree& ptree);
      double local_max_eigenvalue(double* var);
    private:
      void get_3d_fx(double* fequ, double* var);
      void get_3d_fy(double* fequ, double* var);
      void get_3d_fz(double* fequ, double* var); 
    };
  }  // Equation
} // Dune
#endif // __DUNE_EQUATION_CONSTADVECTION_HH__
